package pers.wy.sell.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import pers.wy.sell.domain.OrderDetail;
import pers.wy.sell.utils.serializer.Date2LongSerializer;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单
 *
 * @Author: 月落
 * @Date: Created in 20:15 2018/9/5
 */
@Data
//@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
//@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderDTO {

    private String orderId; // 订单ID

    private String buyerName; // 买家名称

    private String buyerPhone; // 买家联系方式

    private String buyerAddress; // 买家地址

    private String buyerOpenid; // 买家微信Openid

    private BigDecimal orderAmount; // 订单总金额

    private Integer orderStatus; // 订单状态,默认为新订单

    private Integer payStatus; // 支付状态,默认为未支付

    @JsonSerialize(using = Date2LongSerializer.class)
    private Date createTime; // 创建时间

    @JsonSerialize(using = Date2LongSerializer.class)
    private Date updateTime; // 更新时间

    List<OrderDetail> orderDetails;

}
